﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                               xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                               xmlns:MenuOffice="clr-namespace:Rio.Framework.Pages.MenuOffice;assembly=Rio.Framework.Pages"
                               xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                               xmlns:BaseClass="clr-namespace:Rio.Framework.Pages.Controls.BaseClass;assembly=Rio.Framework.Pages"
                               x:Name="userControl"
                               x:Class="Rio.Application.RioWeb.Search.Views.SearchView"
                               mc:Ignorable="d"
                               d:DesignHeight="768"
                               d:DesignWidth="1024">

    <UserControl.Resources>
        <DataTemplate x:Key="TabHeaderTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Loaded="TabTitleLoaded"
                           TextWrapping="Wrap"
                           FontStyle="Italic"
                           VerticalAlignment="Center"
                           Margin="0,0,5,0" />
                <telerik:RadButton Click="CloseTabClick"
                                   VerticalAlignment="Center"
                                   HorizontalAlignment="Center"
                                   Width="15"
                                   Height="15"
                                   Margin="0,0,2,0">
                    <TextBlock Text="X"
                               FontSize="9.333"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Center" />
                </telerik:RadButton>
            </StackPanel>
        </DataTemplate>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot"
          Background="White">

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <MenuOffice:HeadMenu x:Name="headMenu" />

        <telerik:RadTabControl Grid.Row="1"
                               IsContentPreserved="True"
                               ItemsSource="{Binding Tabs, ElementName=userControl, Mode=TwoWay}"
                               SelectedItem="{Binding SelectedTab, ElementName=userControl, Mode=TwoWay}"
                               ItemTemplate="{StaticResource TabHeaderTemplate}" />

        <telerik:RadBusyIndicator Name="busyIndicator"
                                  IsBusy="true"
                                  BusyContent="Chargement des paramètres ..."
                                  Grid.RowSpan="2" />
    </Grid>
</UserControl>
